#include "port.h"

/**
 * Toggles the value on the pins of the given port
 * @author David Asabina
 * @param pin the pin number to be manipulated
 * @param port the port to which to apply the pin manipulation
 */
void pinToggle(uint8_t pin, uint8_t* port){
  *port ^= _BV(pin);
}

/**
 * Clears the value on the pins of the given port
 * @author David Asabina
 * @param pin the pin number to be manipulated
 * @param port the port to which to apply the pin manipulation
 */
void pinClear(uint8_t pin, uint8_t* port){
  *port &= ~_BV(pin);
}

/**
 * Sets the value on the pins of the given port
 * @author David Asabina
 * @param pin the pin number to be manipulated
 * @param port the port to which to apply the pin manipulation
 */
void pinSet(uint8_t pin, uint8_t* port){
  *port |= _BV(pin);
}
